Skip to content

changes according to #466 #463

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Jun 11, 2016
Merged

changes according to #466 #463

merged 23 commits into from
Jun 11, 2016

Conversation

@bounceme
Copy link
Collaborator Author

bounceme commented Jun 4, 2016

and an empty string is a valid property name? hah

@bounceme bounceme changed the title dollar sign as property name proper key/val support Jun 4, 2016
@bounceme
Copy link
Collaborator Author

bounceme commented Jun 4, 2016

possibly adding basic computed properties also

@bounceme
Copy link
Collaborator Author

bounceme commented Jun 4, 2016

@amadeus is there a way to get a specific syntax group like jsblock but for objects only?

@amadeus
Copy link
Collaborator

amadeus commented Jun 4, 2016

@bounceme soooo, that's an update I am planning to do, and we will need it, especially for many ES6 features. Perhaps I can find some time tomorrow to look into it.

@bounceme
Copy link
Collaborator Author

bounceme commented Jun 4, 2016

thanks, all the new shorthand syntaxes are dependent on that, otherwise my giant regex matches basically every object literal property definition in es5

@bounceme bounceme changed the title proper key/val support proper comma first key/val support Jun 5, 2016
@bounceme
Copy link
Collaborator Author

bounceme commented Jun 6, 2016

i'll finish this with the es6/7 pr in mind. @amadeus i don't think the jsfuncargs group works across lines, is that something you would be able to fix?

@amadeus
Copy link
Collaborator

amadeus commented Jun 6, 2016

jsFuncArgs should work just fine over multiple lines. For example:

var func = function(
    x,
    y
){
    return x + y;
};

If you are referring however to jsArrowFuncArgs, then yes, unfortunately this is a limitation I don't think we can get around.

The TL;DR is that jsArrowFuncArgs can only be matched by a test on the final ) to detect a =>. The way vim handles syntax regions, it will just start the region regardless if it can find an ending match which means it would conflict with our jsParens region.

No other syntax file that I have found actually supports a multiline jsArrowFuncArgs like match, they all break the moment you create a new line within them.

@bounceme
Copy link
Collaborator Author

bounceme commented Jun 6, 2016

oh sorry, I mean is there an 'invoked function arguments' syntax pattern?
fun('a','b')

@amadeus
Copy link
Collaborator

amadeus commented Jun 6, 2016

@bounceme ahh, at this point no, although we could potentially chain something to the jsFuncCall logic if that would help? It could have some weird side effects tho.

@bounceme
Copy link
Collaborator Author

bounceme commented Jun 6, 2016

it isn't necessary really, jsparen is enough for now at least

@bounceme bounceme changed the title proper comma first key/val support comma first key/val support,changes according to #466 Jun 7, 2016
@bounceme bounceme changed the title comma first key/val support,changes according to #466 changes according to #466 Jun 9, 2016
@bounceme
Copy link
Collaborator Author

bounceme commented Jun 11, 2016

this pr was waiting on #466, and is a relatively minor update but the additions are helpful for objects handling

@bounceme
Copy link
Collaborator Author

going to merge this as it goes along with @amadeus 's update

@bounceme bounceme merged commit 6a32a38 into develop Jun 11, 2016
@bounceme bounceme deleted the bounceme-patch-1 branch June 11, 2016 22:55
amadeus pushed a commit that referenced this pull request Jun 14, 2016
support less common object defs . 
comment detection compatibility.
only use a c style when not in a block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants